package org.example.service;

import org.example.model.Product;
import org.example.dao.ProductDAO;
import java.util.List;

public class ProductServiceImpl implements ProductService {
    private ProductDAO productDAO;
    
    public ProductServiceImpl() {
        this.productDAO = new ProductDAO();
    }
    
    @Override
    public List<Product> getAllProducts() {
        return productDAO.getAllProducts();
    }
    
    @Override
    public Product getProductById(int id) {
        return productDAO.getProductById(id);
    }
    
    @Override
    public List<Product> getProductsByCategory(int categoryId) {
        return productDAO.getProductsByCategory(categoryId);
    }
} 